﻿#ifndef EX_RECEIVER_H
#define EX_RECEIVER_H

#include "sp_env.h"

#define P_Ring "ring"
#define P_Pop "pop"
#define P_Say "say"

#define P_TD "TD"
#define P_SD "SD"
#define P_BD "BD"
#define P_AD "AD"
#define P_TSD "TSD"

#define RECV_PORT 23321

enum PT_Type
{
    PT_Ring=0x11,
    PT_Pop=0x12,
    PT_Say=0x13,
    PT_Emer=0x14,
    PT_Talkie=0x16
};

class Receiver : public QObject
{
    Q_OBJECT
public:
    explicit Receiver(QObject *parent = 0);

    void processPendingDatagram();
    QString title,content,type,part;

signals:
    void received();

private:
    QUdpSocket *receiver;
};

#endif // EX_RECEIVER_H
